font shorthand

70

/*Syntax*/
font: font-style font-variant font-weight font-size/line-height font-family;

/*In Use*/
font: italic small-caps normal 13px/150% Arial, Helvetica, sans-serif;

You need to supply at least 
1. font-size 
2. font-family 

body {
  font: italic 20px Serif; /* works */
  font: 20px; /* fails */
  font: 18em Fantasy; /* works */
  font: bold small-caps; /* fails */
}
font: italic bold .8em/1.2 Arial, sans-serif;

Comments

Submit
0 Comments